<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<script src="<%=request.getContextPath() %>/resources/js/pay/payManage.js"
        type="text/javascript"></script>
<script src="<%=request.getContextPath() %>/resources/js/pay/payS.js"
        type="text/javascript"></script>
<script src="<%=request.getContextPath() %>/resources/js/pay/payAdd.js"
        type="text/javascript"></script>
<script>
  $(function () {
    initSelect( $('#paidType'), paymentOrderType, true);
    initSelect( $('#currencys'), currencysData, true);
    initTopPayForm();
    initDataGridNoPager($('#subItem'), getPayListSubOptions());
    initBottomPayDataGrid();
    $('#savePayFunction').click(function () {
      var isValid = showValidteMessage(validateBottomSubs(preparePaySubmitPostData().paymentOrderSubs));
      if (isValid) {
        postAjax("/paymentOrder/savePaymentOrderSub.html", JSON.stringify(preparePaySubmitRealPostData()),
                getPayDetail, {async: false});
      } else {
        return isValid;
      }
    });
  });

</script>
<var hidden="hidden" id="payId">${payId}</var>
<div class="easyui-layout" data-options="fit : true,border : false">
  <div data-options="region:'north',title:'财务付款明细',border : false" style="height: 120px; overflow: hidden;">
    <form id="searchForm-small">
      <div class="mLeft60">
        <div class="mTop10 line-handsome">
          <div class="fLeft label-handsome ">
            <label>付款申请号:</label>
            <input id="paidAppNumber" name="paidAppNumber" class="easyui-input" readonly>
            </input>
          </div>
          <div class="fLeft label-handsome ">
            <label>申请金额:</label>
            <input id="appAmount" name="appAmount" class="easyui-input" readonly/>
          </div>

          <div class="fLeft label-handsome ">
            <label>付款单号:</label>
            <input id="paidNumber" name="paidNumber" class="easyui-input" readonly/>
          </div>
            <div class="fLeft label-handsome ">
              <label>付款日期:</label>
              <input id="paidDate" type="text" name="paidDate" class="easyui-datebox" style="width:90px"/>
            </div>
        </div>
        <div class="mTop10 line-handsome">
          <div class="fLeft label-handsome ">
            <label>供应商代码:</label>
            <input id="providerCode" name="providerCode" class="easyui-input" readonly/>
          </div>
          <div class="fLeft label-handsome ">
            <label>供应商名称:</label>
            <input id="providerName" name="providerName" class="easyui-input" readonly/>
          </div>
          <div class="fLeft label-handsome" id="paidTypeDiv">
          <label>付款类型:</label>
          <select id="paidType" name="paidType" style="width:90px">
          </select>
          </div>
          <div class="fLeft label-handsome ">
            <label>实付金额:</label>
            <input id="realAmount" type="text" name="realAmount" class="easyui-input" readonly/>
          </div>
        </div>
        <div class="mTop10 line-handsome">
          <div class="fLeft label-handsome ">
            <label>币种:</label>
            <select id="currencys" name="currencys" style="width:90px" disabled>
            </select>
          </div>
          <div class="fLeft label-handsome ">
            <label>付款说明:</label>
            <input id="paidRemark" name="paidRemark" class="easyui-input"/>
          </div>
          <div class="fLeft label-handsome ">
            <label>备注:</label>
            <input id="remark" name="remark" class="easyui-input"/>
          </div>
        </div>
      </div>
    </form>
  </div>
  <div data-options="region:'center',border : false,title:'财务票据信息列表'">
    <table id="subItem"></table>
  </div>
</div>